/**
 *Copyright (c) 2003, 2018, UMF and/or its affiliates. All rights reserved.
 */
package com.umf.b2b.model.mer;

import com.umf.b2b.MerchantBaseRequest;
import com.umpay.dto.UMFResponse.Message;
import com.umpay.util.UMFUtil;

import java.util.List;

/**
<p>Title:MerBalance,�Ѿ����Ա����ѯ�ӿںϲ�����ʹ��MemberBalance����</p>  
<p>Description: �̻��˻���ѯ���</p>
 */
public class MerBalance extends MerchantBaseRequest{
	
	private String acc_type;//*����ش� �̶�ֵ��203
	private String url = "/member/balance";

	private List<MerBalanceDetail> balance_detail;//[��Ӧ����]

	@Override
	public String getRequestUrl() {
		return baseUrl + url;
	}

	@Override
	public MerBalance doRequest() throws Exception {
		Message<MerBalance> response = UMFUtil.get(createAPIContext(), this,MerBalance.class);
		MerchantBaseRequest baseResult = convertResult(response, MerBalance.class);
		if(baseResult == null)
			return null;
		return (MerBalance)baseResult;
	}

	public String getMer_id() {
		return mer_id;
	}

	public void setMer_id(String mer_id) {
		this.mer_id = mer_id;
	}

	public String getAcc_type() {
		return acc_type;
	}

	public void setAcc_type(String acc_type) {
		this.acc_type = acc_type;
	}
	
	public List<MerBalanceDetail> getBalance_detail() {
		return balance_detail;
	}

	public void setBalance_detail(List<MerBalanceDetail> balance_detail) {
		this.balance_detail = balance_detail;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("MerBalance [acc_type=");
		builder.append(acc_type);
		builder.append(", url=");
		builder.append(url);
		builder.append(", balance_detail=");
		builder.append(balance_detail);
		builder.append(", version=");
		builder.append(version);
		builder.append(", mer_id=");
		builder.append(mer_id);
		builder.append(", ret_code=");
		builder.append(ret_code);
		builder.append(", ret_msg=");
		builder.append(ret_msg);
		builder.append(", links=");
		builder.append(links);
		builder.append("]");
		return builder.toString();
	}

}
